Carbon introduces a new printing model that allows applications to print on Mac OS 8 with existing printer drivers and on Mac OS X with new printer drivers.
On Mac OS 8, the Carbon Printing Manager calls through to the original Printing Manager functions. But on Mac OS X, Carbon applications automatically use a new printing architecture and print through different drivers.
The following is a summary of the major changes you need to be aware of. More information is available on the Carbon website: <http://developer.apple.com/macosx/carbon/>
* The Print Record (TPrint) is no longer directly accessible by applications, and has been split into two separate opaque objects: a PrintSettings object and a PageFormat object. Applications will be given references to these two privately-defined data structures. These references are then used to query the Printing Manager for information contained within the objects.
* A consequence of splitting the Print Record and making it private is there are no fixed sizes. Applications will be able to "extend" both the PrintSettings and PageFormat objects, but applications must not assume a specific size when storing and retrieving PageFormat objects with documents.
* The Carbon Printing Manager will supply functions for flattening and restoring both the PrintSettings and PageFormat objects. When storing printing information with documents, it will suffice to store just the PageFormat object. If older versions of your application store a print record with a saved document, you may continue to do so to provide backward compatibility.
* Application developers should reduce the use of calls that append items to print dialog boxes. We expect to provide a new panel-based interface in the near future.
* There are many improvements to the QuickDraw interfaces for Carbon, including new accessor functions and data structures that should be used.
* All print records use the "draft" style, not the "deferred" style, which implies that a print driver must handle the spooling if it wants to provide spooling for the user. Many, if not all, print drivers perform their own spooling and don't require applications to call PrPicFile to implement spooling. Because it is rarely used, we are eliminating system level spooling code from the Carbon Printing Manager.
* The Carbon Printing Manager now enforces an order in which some routines are called. Any routine used out of scope will return an error.
* All Carbon Printing Manager routines are only valid within a PMBegin/PMEnd block.
* PrintSettings and PageFormats objects are automatically disposed of during a PMEnd call.
Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
DisposePMPageSetupDialogInitUPP
Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.1 and later when running Mac OS 8.6 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
InvokePMPageSetupDialogInitUPP
Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.1 and later when running Mac OS 8.6 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.1 and later when running Mac OS 8.6 or later.The function PMBegin replaces the Printing Manager function PrOpen. Available in Carbon 1.0.2 and later.The PMBeginDocument function replaces the Printing Manager function PrOpenDoc.
The Printing Manager function PrOpenDoc included a parameter that pointed to an input and output buffer. For Carbon, drivers are assumed to be handling I/O buffering. Therefore, PMBeginDocument has no similar parameter. Available in Carbon 1.0.2 and later.The PMBeginPage function replaces the Printing Manager function PrOpenPage. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.PMCreatePageFormat combined withPMCreatePrintSettings is equivalent to creating a new Classic Printing Record (TPrint). Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present. PMCreatePrintSettings combined withPMCreatePageFormat is equivalent to creating a new Classic Printing Record (TPrint). Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present. PMCreateSession is equivalent to the Classic Printing Manager function PrOpen. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.The PMDefaultPageFormat function and thePMDefaultPrintSettings function replace the Printing Manager function PrintDefault. Available in Carbon 1.0.2 and later.The PMDefaultPrintSettings function and thePMDefaultPageFormat function replace the Printing Manager function PrintDefault. Available in Carbon 1.0.2 and later. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.The function PMEnd replaces the Printing Manager function PrClose. Available in Carbon 1.0.2 and later.The PMEndDocument replaces the Printing Manager function PrCloseDoc. Available in Carbon 1.0.2 and later.The PMEndPage function replaces the Printing Manager function PrClosePage. Available in Carbon 1.0.2 and later.The PMError function replaces the Printing Manager function PrError. However, you should reduce your application use of PMError and instead respond to result codes as soon as they are returned by Carbon Printing Manager functions. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.The PMGeneral function is an interim replacement for the Printing Manager function PrGeneral. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.The PMGetCopies function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and obtains information formerly stored in the iCopies field of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMGetDialogAccepted gives you access to the information formerly contained in the fDoIt field of the Printing Manager structure TPrDlg . Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.PMGetDialogDone gives you access to the information formerly contained in the fDone field of the Printing Manager structure TPrDlg . Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.PMGetDialogPtr gives you access to the information formerly contained in the dlg field of the Printing Manager structure TPrDlg . Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMGetDriverCreator function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode. Available in Carbon 1.0.2 and later.The PMGetDriverReleaseInfo function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and obtains information formerly contained in the iPrVersion of the Printing Manager structure TPrint.
Available in Carbon 1.0.2 and later.The PMGetFirstPage function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and obtains information previously stored in the iFstPage field of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.The PMGetGrafPtr function allows access to the pointer formerly stored in the gPort field of the Printing Manager structure TPrPort. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.0.2 and later.The PMGetLastPage function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and obtains information previously stored in the iLstPage field of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMGetOrientation function replaces the Printing Manager opcode getRotnOp, and obtains information formerly stored in the lower byte of the wDev field of the Printing Manager structure TPrStl. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.The PMGetPageRange function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and obtains information previously stored in the iFstPage and iLstPage fields of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.
PMGetPrintSettingsExtendedData
Available in Carbon 1.0.2 and later.This function replaces the Printing Manager opcode getRslDataOp and allows access to information formerly stored in the iVRes and iHRes fields of the Printing Manager structure TPrInfo. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.The PMPageSetUpDialog function replaces the Printing Manager function PrStlDialog. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMPageSetUpDialogInit function replaces the Printing Manager function PrStlInit. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMPageSetUpDialogMain function replaces the Printing Manager function PrDlgMain.
A panel interface under development will eventually make it unnecessary to call PMPageSetUpDialogMain. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.The PMPrintDialog function replaces the Printing Manager function PrJobDialog. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMPrintDialogInit function replaces the Printing Manager function PrJobInit. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
PMPrintDialogInitWithPageFormat
Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMPrintDialogMain function replaces the Dialog Manager function PrDlgMain. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.
PMPrinterGetIndexedPrinterResolution
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.
PMPrinterGetPrinterResolutionCount
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMRelease is equivalent to the Classic Printing Manager function PrClose when the parameter is a PMPrintSession object and its reference count is zero. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionBeginDocument is equivalent to the Classic Printing Manager function PrOpenDoc. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionBeginPage is equivalent to the Classic Printing Manager function PrOpenPage. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.
PMSessionConvertOldPrintRecord
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionDefaultPageFormat combined withPMSessionDefaultPrintSettings is equivalent to the Classic Printing Manager function PrintDefault. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present. PMSessionDefaultPrintSettings combined withPMSessionDefaultPageFormat is equivalent to the Classic Printing Manager function PrintDefault. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionEndDocument is equivalent to the Classic Printing Manager function PrCloseDoc. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionEndPage is equivalent to the Classic Printing Manager function PrClosePage. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when running Mac OS 8.6 or later.
PMSessionGetDocumentFormatGeneration
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.
PMSessionGetDocumentFormatSupported
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.
PMSessionIsDocumentFormatSupported
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionPageSetupDialog is equivalent to the Classic Printing Manager function PrStlDialog. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.PMSessionPageSetupDialogInit is equivalent to the Classic Printing Manager function PrStlInit. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.PMSessionPageSetupDialogMain is equivalent to the Classic Printing Manager function PrDlgMain. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionPrintDialog is equivalent to the Classic Printing Manager function PrJobDialog. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.PMSessionPrintDialog is equivalent to the Classic Printing Manager function PrJobInit. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.PMSessionPrintDialogMain is equivalent to the Classic Printing Manager function PrDlgMain. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.Available in Carbon 1.1 and later when running Mac OS 8.6 or later.
PMSessionSetDocumentFormatGeneration
Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.PMSessionSetIdleProc is equivalent to setting the TPrJob.pIdleProc field in the Classic Printing Record. Available in Carbon 1.1 and later when running Mac OS 8.6 or later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Not available in Carbon.PMSessionValidatePageFormat combined withPMSessionValidatePrintSettings is equivalent to the Classic Printing Manager function PrValidate. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.
PMSessionValidatePrintSettings
PMSessionValidatePrintSettings combined withPMSessionValidatePageFormat is equivalent to the Classic Printing Manager function PrValidate. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.The PMSetCopies function replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and sets information formerly stored in the iCopies field of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.The PMSetDialogAccepted lets you set information formerly contained in the fDoIt field of the Printing Manager structure TPrDlg . Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The <PMSetDialogDone lets you set information formerly contained in the fDone field of the Printing Manager structure TPrDlg. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMSetError function replaces the Printing Manager function PrSetError. You are encouraged to reduce your use of this function. Available in Carbon 1.0.2 and later.The PMSetFirstPagefunction replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and sets information previously stored in the iFstPage field of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMSetItemProc function allows you to set the pointer previously contained in the pItemProc field of the Printing Manager function TPrDlg. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.Available in Carbon 1.0.2 and later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.The PMSetLastPagefunction replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and sets information previously stored in the iLstPage field of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.The PMSetOrientation function replaces the Printing Manager opcode getRotnOp, and sets information formerly stored in the lower byte of the wDev field of the Printing Manager structure TPrStl. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.The PMSetPageRangefunction replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and sets information previously stored in the iFstPage and iLstPage fields of the Printing Manager structure TPrJob. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.
PMSetPrintSettingsExtendedData
Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.This function replaces the Printing Manager opcode getRslDataOp and allows you to change information formerly stored in the iVRes and iHRes fields of the Printing Manager structure TPrInfo. Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.Available in Carbon 1.0.2 and later.Available in Carbon 1.0.2 and later.ThePMValidatePrintSettings and PMValidatePageFormat functions replace the Printing Manager function PrValidate. Available in Carbon 1.0.2 and later.The PMValidatePrintSettings andPMValidatePageFormat functions replace the Printing Manager function PrValidate. Available in Carbon 1.0.2 and later.